package com.future.dao;

import java.util.Date;
import java.util.List;

import com.future.model.Metting;
import com.future.model.Records;
import com.jfinal.aop.Inject;
import com.jfinal.kit.Kv;

public class MettingDao {
	@Inject
	private Metting metting;
	@Inject Records records;
	public List<Metting> getMettingList(String sfsh) {
		return this.metting.find(this.metting.getSqlPara("metting.getMettingList", sfsh));
	}
	public List<Metting> getMyMeetingList(String type, String userId) {
		if("0".equals(type)){
			return this.metting.find(this.metting.getSqlPara("metting.getMyMettingList", userId));
		}else{
			return this.metting.find(this.metting.getSqlPara("metting.getICreateMettingList", userId));
		}
	}
	public List<Records> getMessages(String mettingid, Date fromdate) {
		Kv con = Kv.by("mettingid", mettingid).set("fromdate", fromdate);
		return this.records.find(this.records.getSqlPara("metting.getrecords", con));
	}

}
